﻿using InkjetControl.services;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;

namespace InkjetControl
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public Server SrvService { get; private set; }
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            SrvService = new Server();
            Thread t = new Thread(() => SrvService.RunServerAsync().Wait());
            t.Start();
        }

        protected override void OnExit(ExitEventArgs e)
        {
            SrvService.OnExit();
            base.OnExit(e);
            
        }
    }
}
